'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.post('/api/add',controller.home.add);
  router.get('/user/:id',controller.user.user.detail);
  //定义restful 一组crud的接口  增删改查
  router.resources('/api/address',controller.address);

  router.get('/api/list',controller.list.list);


  //注册

  router.post('/api/registry',controller.user.user.registry);

  //登录
  router.post('/api/login',controller.user.user.login);
};
